Robotics 1.0 Lesson Plan
Lesson 23: Command the Claw.

Purpose:Code the robotic arm to respond to joystick input.

No. of. Classes

1 - (Time : 1:30 minutes, Each group maximum 4 children).

Materials Required

Laptop or desktop with Mu Editor installed.

CircuitPython installed on CPX board, Crickit, 5v Battery, USB Cable

3 MG995 Servos - two Continuous servos and one 180 servo.

Servo Bracket and U bracket.

Joystick

Cligo gripper kit

Jumper wires.

Prior knowledge

  • Connect servo motors to the Crickit
  • Use a joystick as an input device
  • Run basic CircuitPython programs to control motor movement and joystick
  • Exercises

    Exercise:1



  • Connect the joystick and servo motors to the Crickit using the instructions in this video . Use the MG995 180 servo for the gripper and the continuous servos for the arm.


  • Use this sample code to test the joystick and servo movement



  • Exercise:2



  • Map the joystick movements - x,y to each of the arm servos and the joystick button to the gripper servo for open/close functionalities.


  • Solution



  • Click here to see the solution Video
  • Click here to see the code for Exercise 2
  • Click here to see the code explanation for Exercise 2
  • Teacher's Instruction
    1. Explain the objective of the activity - controlling a robotic arm and gripper using a joystick.
    2. Demonstrate how the joystick’s X and Y movements control different arm joints.
    3. Show how the joystick button or movement controls the opening and closing of the gripper.
    4. Guide students to check the initial position of each servo before running the program.
    5. Help students securely tighten the servo brackets and gripper connections.
    6. Demonstrate the CircuitPython code that maps joystick values to servo angles.
    7. Discuss real-world uses of robotic arms such as in warehouses, factories, and hospitals.
    8. If you wanted this arm to lift heavier objects, what parts would you need to change? Think in terms of parts like the servos and gears and the code